function B = getRelativeRangeError(A,ind,kind)
%two ways to caculate relative range error: divided by min or by mean.
if nargin==2, kind='mean';end
kind = lower(kind);
keyboard
if strcmp(kind,'mean')
    B = (max(A)-min(A))./mean(A);
    B(ind)= A(1,ind);   
elseif strcmp(kind,'min')
    B = (max(A)-min(A))./min(A);
    B(ind)= A(1,ind);     
end
end